package PayrollCalculation;

//客服奖金以好评率计算：[0,60):0，[60,80):1000，[80,100]:2000
public class CustomerService extends Employee{
    private static final int POSITIVE_RATING_1 = 0;
    private static final int POSITIVE_RATING_2 = 1000;
    private static final int POSITIVE_RATING_3 = 2000;

    public CustomerService(String name, double baseSalary, double positiveRating) {
        super(name, baseSalary, positiveRating);
    }

    @Override
    public double calculateSalary() {
        if(performance<0.6){
            return baseSalary+POSITIVE_RATING_1;
        } else if (performance<0.8) {
            return baseSalary+POSITIVE_RATING_2;
        } else {
            return baseSalary+POSITIVE_RATING_3;
        }
    }
}
